import request from '@/utils/request'

// 查询公告列表
export function listAnnounce(query) {
  return request({
    url: '/manage/announce/list',
    method: 'get',
    params: query
  })
}

// 查询公告详细
export function getAnnounce(announceId) {
  return request({
    url: '/manage/announce/' + announceId,
    method: 'get'
  })
}

// 新增公告
export function addAnnounce(data) {
  return request({
    url: '/manage/announce',
    method: 'post',
    data: data
  })
}

// 修改公告
export function updateAnnounce(data) {
  return request({
    url: '/manage/announce',
    method: 'put',
    data: data
  })
}

// 删除公告
export function delAnnounce(announceId) {
  return request({
    url: '/manage/announce/' + announceId,
    method: 'delete'
  })
}
